package com.example.day11;

/**
 * @author Lenovo
 */
public class AnimalDemo {
    public static void main(String[] args) {
        //多态
//向上转型
        Animal a = new Cat();
        a.eat();
        //
        a.playGame();
        //向下转型
        Cat c = (Cat)a;
        c.eat();
        c.playGame();
    }
}
